<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>LTE-UNB: SimulationEnvironment/SimulationEnvironment.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">LTE-UNB
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">SimulationEnvironment/SimulationEnvironment.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_simulation_environment_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef _SimulationEnvironment_h_</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define _SimulationEnvironment_h_</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;itpp/itbase.h&gt;</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;User.h&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="_e_node_b_8h.html">ENodeB.h</a>&quot;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;<a class="code" href="_mobility_8h.html">Mobility.h</a>&quot;</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="keyword">using namespace </span>itpp;
<a name="l00028"></a>00028 <span class="keyword">using namespace </span>std;
<a name="l00029"></a>00029 
<a name="l00034"></a><a class="code" href="namespace_simulation_environment.html">00034</a> <span class="keyword">namespace </span><a class="code" href="class_simulation_environment_1_1_simulation_environment.html">SimulationEnvironment</a>
<a name="l00035"></a>00035 {
<a name="l00036"></a>00036 
<a name="l00041"></a><a class="code" href="class_simulation_environment_1_1_simulation_environment.html">00041</a> <span class="keyword">class </span><a class="code" href="class_simulation_environment_1_1_simulation_environment.html">SimulationEnvironment</a>
<a name="l00042"></a>00042 {
<a name="l00043"></a>00043    <span class="keyword">public</span>:
<a name="l00044"></a>00044            
<a name="l00049"></a>00049       ~<a class="code" href="class_simulation_environment_1_1_simulation_environment.html">SimulationEnvironment</a>();
<a name="l00050"></a>00050       
<a name="l00055"></a>00055       <span class="keyword">static</span> <a class="code" href="class_simulation_environment_1_1_simulation_environment.html">SimulationEnvironment</a>* getInstance();
<a name="l00056"></a>00056       
<a name="l00061"></a>00061       <span class="keywordtype">void</span> setParameters();
<a name="l00062"></a>00062       
<a name="l00067"></a>00067       <span class="keywordtype">void</span> clear();
<a name="l00068"></a>00068       
<a name="l00073"></a>00073       <span class="keywordtype">void</span> createUsers();
<a name="l00074"></a>00074       
<a name="l00079"></a>00079       <span class="keywordtype">void</span> createENodeBs();  
<a name="l00080"></a>00080       
<a name="l00085"></a>00085       <a class="code" href="class_physical_node_1_1_user.html">PhysicalNode::User</a>* getUser( <span class="keywordtype">int</span> <span class="keywordtype">id</span> );   
<a name="l00086"></a>00086       
<a name="l00091"></a>00091       <a class="code" href="class_physical_node_1_1_e_node_b.html">PhysicalNode::ENodeB</a>* getENodeB( <span class="keywordtype">int</span> <span class="keywordtype">id</span> ); 
<a name="l00092"></a>00092       
<a name="l00097"></a>00097       Array&lt;PhysicalNode::PhysicalNode*&gt;* getUsers();   
<a name="l00098"></a>00098       
<a name="l00103"></a>00103       Array&lt;PhysicalNode::PhysicalNode*&gt;* getENodeBs(); 
<a name="l00104"></a>00104       
<a name="l00109"></a>00109       <span class="keywordtype">void</span> initialize();  
<a name="l00110"></a>00110       
<a name="l00111"></a>00111    <span class="keyword">private</span>:
<a name="l00112"></a>00112       
<a name="l00117"></a>00117       <span class="keywordtype">string</span> name_;
<a name="l00118"></a>00118       
<a name="l00123"></a>00123       <a class="code" href="class_simulation_environment_1_1_simulation_environment.html">SimulationEnvironment</a>();
<a name="l00124"></a>00124       
<a name="l00129"></a>00129       <span class="keyword">static</span> <a class="code" href="class_simulation_environment_1_1_simulation_environment.html">SimulationEnvironment</a>* instance_;    
<a name="l00130"></a>00130      
<a name="l00135"></a>00135       Array&lt;PhysicalNode::PhysicalNode*&gt; users_;
<a name="l00136"></a>00136       
<a name="l00141"></a>00141       Array&lt;PhysicalNode::PhysicalNode*&gt; eNodeBs_;
<a name="l00142"></a>00142       
<a name="l00147"></a>00147       <span class="keywordtype">int</span> numberENodeBs_;       
<a name="l00148"></a>00148       
<a name="l00153"></a>00153       <span class="keywordtype">int</span> numberUsers_;
<a name="l00154"></a>00154       
<a name="l00159"></a>00159       <span class="keywordtype">int</span> userIdCounter_;
<a name="l00160"></a>00160       
<a name="l00165"></a>00165       <span class="keywordtype">int</span> eNodeBIdCounter_;
<a name="l00166"></a>00166       
<a name="l00171"></a>00171       <a class="code" href="class_mobility_1_1_mobility.html">Mobility::Mobility</a>* mobility_;
<a name="l00172"></a>00172 };
<a name="l00173"></a>00173 
<a name="l00174"></a>00174 };
<a name="l00175"></a>00175 
<a name="l00176"></a>00176 <span class="keyword">inline</span>
<a name="l00177"></a>00177 <a class="code" href="class_physical_node_1_1_user.html">PhysicalNode::User</a>*
<a name="l00178"></a>00178 <a class="code" href="class_simulation_environment_1_1_simulation_environment.html#a63fcc5a988143232484e8e65a74e4a99">SimulationEnvironment::</a>
<a name="l00179"></a><a class="code" href="class_simulation_environment_1_1_simulation_environment.html#a63fcc5a988143232484e8e65a74e4a99">00179</a> <a class="code" href="class_simulation_environment_1_1_simulation_environment.html#a63fcc5a988143232484e8e65a74e4a99">SimulationEnvironment::getUser</a>( <span class="keywordtype">int</span> <span class="keywordtype">id</span> )
<a name="l00180"></a>00180 {
<a name="l00181"></a>00181    <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><a class="code" href="class_physical_node_1_1_user.html">PhysicalNode::User</a>*<span class="keyword">&gt;</span>( users_( <span class="keywordtype">id</span> ) ); 
<a name="l00182"></a>00182 }
<a name="l00183"></a>00183 
<a name="l00184"></a>00184 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00185"></a>00185 
<a name="l00186"></a>00186 <span class="keyword">inline</span>
<a name="l00187"></a>00187 <a class="code" href="class_physical_node_1_1_e_node_b.html">PhysicalNode::ENodeB</a>*
<a name="l00188"></a>00188 <a class="code" href="class_simulation_environment_1_1_simulation_environment.html#a0e2041cb58052defbe05c0c3f572f770">SimulationEnvironment::</a>
<a name="l00189"></a><a class="code" href="class_simulation_environment_1_1_simulation_environment.html#a0e2041cb58052defbe05c0c3f572f770">00189</a> <a class="code" href="class_simulation_environment_1_1_simulation_environment.html#a0e2041cb58052defbe05c0c3f572f770">SimulationEnvironment::getENodeB</a>( <span class="keywordtype">int</span> <span class="keywordtype">id</span> )
<a name="l00190"></a>00190 {
<a name="l00191"></a>00191    <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><a class="code" href="class_physical_node_1_1_e_node_b.html">PhysicalNode::ENodeB</a>*<span class="keyword">&gt;</span>( eNodeBs_( <span class="keywordtype">id</span> ) ); 
<a name="l00192"></a>00192 }
<a name="l00193"></a>00193 
<a name="l00194"></a>00194 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00195"></a>00195 
<a name="l00196"></a>00196 <span class="keyword">inline</span>
<a name="l00197"></a>00197 Array&lt;PhysicalNode::PhysicalNode*&gt;*
<a name="l00198"></a>00198 <a class="code" href="class_simulation_environment_1_1_simulation_environment.html#a49c7f0a1cd5fe6c4f67be4d01e85710e">SimulationEnvironment::</a>
<a name="l00199"></a><a class="code" href="class_simulation_environment_1_1_simulation_environment.html#a49c7f0a1cd5fe6c4f67be4d01e85710e">00199</a> <a class="code" href="class_simulation_environment_1_1_simulation_environment.html#a49c7f0a1cd5fe6c4f67be4d01e85710e">SimulationEnvironment::getUsers</a>()
<a name="l00200"></a>00200 {
<a name="l00201"></a>00201    <span class="keywordflow">return</span> &amp;users_; 
<a name="l00202"></a>00202 }
<a name="l00203"></a>00203 
<a name="l00204"></a>00204 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00205"></a>00205 
<a name="l00206"></a>00206 <span class="keyword">inline</span>
<a name="l00207"></a>00207 Array&lt;PhysicalNode::PhysicalNode*&gt;*
<a name="l00208"></a>00208 <a class="code" href="class_simulation_environment_1_1_simulation_environment.html#a37359affdf8650af252f6cfc7eea47bc">SimulationEnvironment::</a>
<a name="l00209"></a><a class="code" href="class_simulation_environment_1_1_simulation_environment.html#a37359affdf8650af252f6cfc7eea47bc">00209</a> <a class="code" href="class_simulation_environment_1_1_simulation_environment.html#a37359affdf8650af252f6cfc7eea47bc">SimulationEnvironment::getENodeBs</a>()
<a name="l00210"></a>00210 {
<a name="l00211"></a>00211    <span class="keywordflow">return</span> &amp;eNodeBs_; 
<a name="l00212"></a>00212 }
<a name="l00213"></a>00213 
<a name="l00214"></a>00214 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00215"></a>00215 
<a name="l00216"></a>00216 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Thu Oct 25 2012 22:25:35 for LTE-UNB by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
